<?php
class WCException extends Exception{
	/**
	 * List of the various pre-defined error codes
	 */
	//CURL Errors
	public static $CURL_BAD_HTML=100;
	public static $CURL_BAD_URL=101;
	
	//database errors
	public static $DB_CONN_ERROR=200;
	public static $DB_QUERY_ERROR=201;
	public static $DB_ALREADY_EXISTS=202;
	
	//general errors
	public static $CLASS_ERROR=300;
	public static $MISSING_REQUIRED_ERROR=301;
	 
	
	public function WCException($errorCode,$errorMessage){
		$this->code = $errorCode;
		$this->message = $errorMessage;
	}
	
	public function printHTMLTrace(){
		echo str_replace("\n",'<br/>',$this->getTraceAsString());
	}
		
}
?>